package com.naiterui.ehp.bs.cms.modules.sys.entity;

import java.io.Serializable;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.naiterui.ehp.bs.cms.common.entity.BaseTree;
import com.naiterui.ehp.bs.cms.common.json.Dict;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 菜单管理
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("menu")
public class Menu extends BaseTree implements Serializable {
    private static final long serialVersionUID = 7964159306626238398L;

    /**
     * 父菜单名称
     */
    @TableField(exist = false)
    private String parentName;

    /**
     * 菜单名称
     */
    private String name;

    /**
     * 菜单URL
     */
    private String url;

    /**
     * 授权(多个用逗号分隔，如：user:list,user:create)
     */
    private String perms;

    /**
     * 类型 0：目录 1：菜单 2：按钮
     */
    @Dict(type = "menu_type")
    private Integer type;

    /**
     * 菜单图标
     */
    private String icon;

    /**
     * 组件路径
     */
    private String component;

    private Integer orderNum;

    /**
     * 是否隐藏 0：不隐藏  1：隐藏
     */
    @Dict(type = "menu_hidden")
    private Integer hidden;

    @TableField(exist = false)
    private List<?> list;

    @TableLogic
    private Integer delFlag;

}
